Skip to content

Build: Fix for cross-compilation - #14752

Open
MarkusVolk wants to merge 2 commits into
PCSX2:masterfrom
MarkusVolk:master
Open

Build: Fix for cross-compilation#14752
MarkusVolk wants to merge 2 commits into
PCSX2:masterfrom
MarkusVolk:master

Conversation

@MarkusVolk

@MarkusVolk MarkusVolk commented Jul 23, 2026

Copy link
Copy Markdown

Description of Changes
Fixes issues with cross-compilation.

Reason for the Changes

  • Use CMAKE_SYSTEM_PROCESSOR instead of CMAKE_HOST_SYSTEM_PROCESSOR to determine the correct target architecture during cross-compilation.

  • Do not attempt to determine the page/cache line size, as this is not possible during cross-compilation using this method.

Recommended Testing Steps
These changes should hopefully have no impact on builds that do not involve cross-compilation, so no additional testing should be required.

Did you use AI to find, test, or implement this issue or feature?
No.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@Mrlinkwii

Copy link
Copy Markdown
Contributor

a Build: tag in the commit mesaage for the commit message to be happy

@MarkusVolk MarkusVolk changed the title fix for cross-compilation BuildParameters.cmake: Fix for cross-compilation Jul 23, 2026
@MarkusVolk MarkusVolk changed the title BuildParameters.cmake: Fix for cross-compilation Build: Fix for cross-compilation Jul 23, 2026
CMAKE_HOST_SYSTEM_PROZESSOR is used to select the architecture. This fails
for cross builds but cmake provides a solution for this case by using
CMAKE_SYSTEM_PROZESSOR instead.
https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html

This fixes issues seen if building pcsx2 for aarch64 using the openembedded
cross environment and should hopefully not affect builds if not cross-compiling.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Not possible like this for cross-compilation

Signed-off-by: Markus Volk <f_l_k@t-online.de>
@SternXD

SternXD commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Also fill out the PR Template.

@Mrlinkwii Mrlinkwii added this to the Release 2.10 milestone Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants